package com.hqyj.am.controller;

import com.hqyj.am.pojo.ResultVo;
import com.hqyj.am.pojo.User;
import com.hqyj.am.service.EmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: chenglongfei
 * @date: 2022/8/18
 * @Description EmailController
 */
@RestController
@RequestMapping("/email")
public class EmailController {
    @Autowired
    EmailService emailService;

    @PostMapping("/send")
    public ResultVo emailSend(String email){
        return emailService.emailSend(email);
    }
    @PostMapping("/change")
    public ResultVo emailChange(User user){
        return emailService.emailChange(user);
    }

    @PostMapping("/save")
    public ResultVo emailSave(User user){
        return emailService.emailSave(user);
    }

}
